package com.bird.设计模式.结构型.装饰者模式.v2;

/**
 * @data 2022/3/14 17:52
 * @author: bird
 * @description: 装饰者模式角色之三: 鸡蛋装饰者类(实体装饰者类)
 */
public class EggDecorator extends AbstractDecorator {
    public EggDecorator(AbstractBatteryCake abstractBatteryCake) {
        super(abstractBatteryCake);
    }

    @Override
    protected String getDesc() {
        return super.getDesc() + " 加一个鸡蛋";
    }

    @Override
    protected int cost() {
        return super.cost() + 1;
    }
}
